package study.zhangxh.annotations.beans;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 约束，用来提取数据库表的元数据
 *
 * @author: zhangxh
 * @email: zhangxh@cheegu.com
 * @date: 2018/6/14 22:59
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Constraints {
    boolean primaryKey() default false;

    boolean allowNull() default false;
    boolean unique() default  false;

}
